package com.badibadi.mail;

import com.badibadi.activity.ConsultingEvaluationActivity;
import com.badibadi.mytools.Utils;
import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.R.layout;
import com.badibadi.uniclubber.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

/**
 * 12 答方：问方对答方第一次回答不满意，答方主动选择了退款操作（退款完成后开始评价） 问方：
 * 
 * @author Administrator
 * 
 */
public class Mail34_36Activity extends Mail245Activity {

	AlertDialog al_sheding;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// setContentView(R.layout.activity_mail34_36);
	}

	@Override
	protected void DongTaiPeiZhi() {
		// TODO Auto-generated method stub

		TextView title_mail = (TextView) this.findViewById(R.id.title_mail);
		title_mail.setText(getResources().getString(R.string.wx_reply_zhanneixin));
		TextView tishi = (TextView) this.findViewById(R.id.tishi);
		tishi.setText(getResources().getString(R.string.wx_yi_tuikuan_kuohao));
		tishi.setVisibility(View.VISIBLE);
		if (rank.equals("answerer"))// 答方
		{
			// 设定质询费
			Button shedingzhixunfei = (Button) this
					.findViewById(R.id.shedingzhixunfei);
			shedingzhixunfei.setVisibility(View.VISIBLE);
			shedingzhixunfei.setText(getResources().getString(R.string.wx_tuikuan_reason));
				shedingzhixunfei.setOnClickListener(new View.OnClickListener() {

					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						// setFees();
						LayoutInflater inflater = LayoutInflater
								.from(Mail34_36Activity.this);
						View view = inflater.inflate(
								R.layout.tuikuanchenggong36, null);

						// //支付宝手续费
						// TextView
						// alipay_charge=(TextView)view.findViewById(R.id.alipay_charge);
						// alipay_charge.setText(payUserContactShow1Model.getAlipay_charge());
						//
						// et_feiyong.setText();

						TextView refund_time = (TextView) view
								.findViewById(R.id.refund_time);
						refund_time.setText(payUserContactShow1Model
								.getRefund_time());
						// 评价
						Button queding = (Button) view
								.findViewById(R.id.queding);
						queding.setOnClickListener(new View.OnClickListener() {

							@Override
							public void onClick(View v) {
								Intent intent=new Intent(Mail34_36Activity.this,ConsultingEvaluationActivity.class);
								intent.putExtra("uid", payUserContactShow1Model.getSent_uid());
								intent.putExtra("chuanru_zhanneiId", payUserContactShow1Model.getZhannei_Id());
								intent.putExtra("chuanru_asker_or_answerer", "answerer");
								startActivity(intent);

							}
						});
						al_sheding = new AlertDialog.Builder(
								Mail34_36Activity.this).setView(view).show();
					}
				});

		} else {
			// 设定质询费
			Button shedingzhixunfei = (Button) this
					.findViewById(R.id.shedingzhixunfei);
			shedingzhixunfei.setVisibility(View.VISIBLE);
			shedingzhixunfei.setText(getResources().getString(R.string.wx_tuikuan_reason));
				shedingzhixunfei.setOnClickListener(new View.OnClickListener() {

					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						// setFees();
						LayoutInflater inflater = LayoutInflater
								.from(Mail34_36Activity.this);
						View view = inflater.inflate(
								R.layout.tuikuanchenggong34, null);

						// 支付宝手续费
						TextView alipay_charge = (TextView) view
								.findViewById(R.id.alipay_charge);
						alipay_charge.setText(payUserContactShow1Model
								.getAlipay_charge());
						//
						// et_feiyong.setText();
						TextView refund_time = (TextView) view
								.findViewById(R.id.refund_time);
						refund_time.setText(payUserContactShow1Model
								.getRefund_time());
						// 评价
						Button queding = (Button) view
								.findViewById(R.id.queding);
						queding.setOnClickListener(new View.OnClickListener() {

							@Override
							public void onClick(View v) {
								// TODO Auto-generated method stub
								Intent intent=new Intent(Mail34_36Activity.this,ConsultingEvaluationActivity.class);
								intent.putExtra("uid", payUserContactShow1Model.getUid());
								intent.putExtra("chuanru_zhanneiId", payUserContactShow1Model.getZhannei_Id());
								intent.putExtra("chuanru_asker_or_answerer", "asker");
								startActivity(intent);
							}
						});
						al_sheding = new AlertDialog.Builder(
								Mail34_36Activity.this).setView(view).show();
					}
				});
		}
	}

}
